DefinitionBlock ("", "SSDT", 2, "S240", "_PS2", 0)
{
    External(_SB.PCI0.LPCB.EC, DeviceObj)
    External(_SB.PCI0.LPCB.PS2K, DeviceObj)
    
    Scope(_SB.PCI0.LPCB.EC)
    {
        Method(_Q14, 0) // (F6) Brightness Up
        {
            Notify(PS2K, 0x0406)
        }
        Method(_Q15, 0) // (F5) Brightness Down
        {
            Notify(PS2K, 0x0405)
        }
        Method (_Q6A, 0) // (F4) Microphone Mute - Siri
        {
            Notify (PS2K, 0x033E)
        }
        Method (_Q16, 0)  // Projector / Mirror mode
        {
            Notify (PS2K, 0x046E)
        }
        Method (_Q64, 0)  // (F8) Wireless ON/OFF - Notification Center
        {
            Notify (PS2K, 0x0342)
        }
        Method (_Q66, 0)  // (F9) Settings - System Preferences
        {
            Notify (PS2K, 0x0367)
        }
        Method (_Q67, 0)  // (F10) Windows Search - Spotlight Search
        {
            Notify (PS2K, 0x0368)
        }
        Method (_Q68, 0) // (F11) App Switcher - Mission Control
        {
            Notify (PS2K, 0x0369)
        }
        Method (_Q69, 0) // (F12) Start Menu - Launchpad
        {
            Notify (PS2K, 0x036A)
        }
    }
    
    Scope(_SB.PCI0.LPCB.PS2K)
    {
        Method(_DSM, 4)
        {
            If (!Arg2) { Return (Buffer(One) { 0x03 } ) }
            Return (Package()
            {
                "RM,oem-id", "LENOVO",
                "RM,oem-table-id", "Thinkpad_ClickPad",
            })
        }
        
        Name(RMCF, Package()
        {
            "Synaptics TouchPad", Package()
            {
                "BogusDeltaThreshX", 800,
                "BogusDeltaThreshY", 800,
                "Clicking", ">y",
                "DragLockTempMask", 0x40004,
                "DynamicEWMode", ">n",
                "FakeMiddleButton", ">n",
                "HWResetOnStart", ">y",
                "PalmNoAction When Typing", ">y",
                "ScrollResolution", 800,
                "SmoothInput", ">y",
                "UnsmootInput", ">y",
                "Thinkpad", ">y",
                "EdgeBottom", 0,
                "FingerZ", 30,
                "MaxTapTime", 100000000,
                "MouseMultiplierX", 2,
                "MouseMultiplierY", 2,
                "MouseScrollMultiplierX", 2,
                "MouseScrollMultiplierY", 2,
            },
            "Keyboard", Package()
            {
                "Custom PS2 Map", Package()
                {
                Package(){},
                "e037=64", // PrtSc=F13
                },
            },
        })
    }
}
